/*
 * Copyright (c) 2025 CAX Conversion Project
 */
package com.comac.ins.isfd.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 周期单位（hour-时，day-天）
 *
 * @author hxloongs
 * @date 2024-10-12
 */
@AllArgsConstructor
@Getter
public enum IsfdDatasourceTaskSchedulingConfigCycleEnum {

    // 实时任务状态
    HOUR("hour", "小时"),
    DAY("day", "天");

    private final String value;
    private final String desc;

    public static String getDescByValue(String value) {
        for (IsfdDatasourceTaskSchedulingConfigCycleEnum status : values()) {
            if (status.getValue().equals(value)) {
                return status.getDesc();
            }
        }
        return null;
    }
}
